package com.nobug.run;

import com.nobug.MyRobot;

import java.awt.event.KeyEvent;

/**
 * @author 389561407@qq.com
 * @version 1.0
 * @since 2023-02-04
 */
public class ZidongF7F8 {

    public static void main(String[] args) {
        System.out.println("自动按 F7 F8");
        MyRobot.sleep(3000);

        while (true){
            MyRobot.key(KeyEvent.VK_F7);
            MyRobot.sleep(1000);
            MyRobot.key(KeyEvent.VK_F8);
            MyRobot.sleep(60*1000);
        }

    }

    public static void runMain() {
        System.out.println("十秒后按第一次");
        MyRobot.sleep(10000);
        int s = 3*60+1;
        System.out.println("自动按 F7 F8，间隔时间为"+s+"秒");
        while (true){
            MyRobot.key(KeyEvent.VK_F7);
            MyRobot.sleep(1000);
            MyRobot.key(KeyEvent.VK_F8);
            MyRobot.sleep(s*1000);
        }
    }
}
